package cn.gogpay.dcb.api.feign;

import cn.gogpay.dcb.api.feign.impl.UserCenterClientClientImpl;
import cn.gogpay.dcb.common.dto.ResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * description
 *
 * @author huangting@gogpay.cn
 * @date 2019/10/9 14:34
 */
@Primary
@FeignClient(name = "user-center", fallback = UserCenterClientClientImpl.class)
public interface UserCenterClient {

    /**
     * 根据用户ID查询用户信息
     *
     * @param userId
     * @return
     */
    @RequestMapping(value = "/getUserInfo/{userId}")
    @ResponseBody
    ResultDTO searchUserByUserId(@PathVariable(value = "userId") String userId);
}
